<template>
  <div>
    <h2>字体图标<span class="icon-total">({{icons.length}} 个)</span></h2>
    <xdh-grid :data="icons" direction="row" justify="flex-start" wrap="wrap" class="icons-grid">
      <template slot-scope="scope">
        <div class="icon-item">
          <i :class="scope.item"></i>
          {{scope.item}}
        </div>
      </template>
    </xdh-grid>
  </div>

</template>

<script>
  import icons from '@/base/icons'

  export default {
    data() {
      return {
        icons: icons
      }
    }
  }
</script>

<style lang="scss" scoped>
  .icon-item {
    border: 1px solid #eee;
    width: 150px;
    height: 80px;
    margin-right: -1px;
    margin-bottom: -1px;
    font-size: 12px;
    text-align: center;
    i {
      font-size: 30px;
      display: block;
      margin: 10px;
    }
  }

  .icon-total {
    font-size: 20px;
    color: yellowgreen;
    margin-left: 20px;
  }

  .icons-grid {
    margin-top: 20px;
  }
</style>
